package com.ningxia.water.controller.report;

import com.ningxia.water.reuslt.Result;
import com.ningxia.water.reuslt.ResultResponse;
import com.ningxia.water.service.IZtAreaInfoService;
import com.ningxia.water.vo.out.ReportVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/areareport")
@Api(tags = "报表管理-工业园区报表")
public class AreaReportController {

    @Autowired
    private IZtAreaInfoService areaInfoService;

    @GetMapping("/getareareport")
    @ApiOperation("获取工业园区报表数据")
    public Result getAreaReport(@RequestParam String type, @RequestParam String currentTime){
        List<ReportVo> list = areaInfoService.getAreaReport(type, currentTime);
        return ResultResponse.getSuccessResult(list);
    }
}
